//
// Created by ChenJi on 2021/4/13.
//

#ifndef WARNER_2_DOOR_MANAGER_H
#define WARNER_2_DOOR_MANAGER_H

#endif //WARNER_2_DOOR_MANAGER_H

#include "main.h"

typedef struct {
    uint8_t sensor_id;
    uint8_t now_state;
    uint32_t stable_time;
    uint8_t chenged;
    uint16_t filtering_threshold;
} Door_Sensor;


__weak void onDoorSensor_1_Chenged(uint8_t state) {}

__weak void onDoorSensor_2_Chenged(uint8_t state) {}

void updateDoorState();

__weak void onDoorOpen();

__weak void onDoorClose();
void DoorManagerInit();